from django.db import models

from player.models import Player
from planet.models import Planet

# Create your models here.
class StaticFleet(models.Model):
    
    hyperiums_id = models.IntegerField("Hyperiums id")
    planet = models.ForeignKey(Planet)
    race = models.IntegerField("Race")
    owner = models.ForeignKey(Player,blank=True,null=True)
    defending = models.BooleanField("Defending?")
    bombing = models.BooleanField("Bombing?")
    amount_fleet = models.IntegerField("Amount fleet",blank=True,null=True)
    amount_GA = models.IntegerField("Amount GA",blank=True,null=True)
    last_update_date = models.DateTimeField("Update date")
    
class MovingFleet(models.Model):
    
    hyperiums_id = models.IntegerField("Hyperiums id")
    planet_destination = models.ForeignKey(Planet)
    arrival_time = models.DateTimeField("Arrival time")
    race = models.IntegerField("Race")
    owner = models.ForeignKey(Player)
    defending = models.BooleanField("Defending?")
    bombing = models.BooleanField("Bombing?")
    amount_fleet = models.IntegerField("Amount fleet",blank=True,null=True)
    amount_GA = models.IntegerField("Amount GA",blank=True,null=True)
    last_update_date = models.DateTimeField("Update date")
    